import numpy as np
b = np.array((10,9.5,10.2,11,10.8,10.6,11.2))
np.diff(b)

ret = np.diff(b)/b[:-1]
print('涨跌率{}'.format(ret))
np.where(ret>0)